package cn.java.yuming;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class Address {
	static public void main(String[] args) {
		try {
			// InetAddress[] addresses =
			// InetAddress.getAllByName("www.sina.com");
			String name = args[0];
			InetAddress[] addresses = InetAddress.getAllByName(name);
			for (int i = 0; i < addresses.length; i++) {
				System.out.println(name + "[" + i + "]: "
						+ addresses[i].getHostAddress());
			}
		} catch (UnknownHostException uhe) {
			System.err.println("Unable to find: " + args[0]);
		}
	}
}
